package com.ruoyi.system.service.impl;

import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysBoatEventlog;
import com.ruoyi.system.mapper.SysBoatEventlogMapper;
import com.ruoyi.system.service.SysBoatEventlogService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 90555
 * @description 针对表【sys_boat_eventlog(
 * 无人船-操作事件)】的数据库操作Service实现
 * @createDate 2023-12-05 11:23:48
 */
@Service
public class SysBoatEventlogServiceImpl extends ServiceImpl<SysBoatEventlogMapper, SysBoatEventlog>
        implements SysBoatEventlogService {

    @Override
    public AjaxResult getBoatEventlogList(SysBoatEventlog param) {
        List<SysBoatEventlog> list = list(Wrappers.<SysBoatEventlog>lambdaQuery()
                .eq(ObjectUtil.isNotNull(param.getTaskId()), SysBoatEventlog::getTaskId, param.getTaskId())
                .eq(ObjectUtil.isNotNull(param.getCommandCode()), SysBoatEventlog::getCommandCode, param.getCommandCode())
        );
        return AjaxResult.success(list);
    }
}




